package com.run.motion.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


/**
 * 发布动态对象 my_dynamic
 * 
 * @author lyq
 * @date 2022-03-26
 */
public class Dynamic
{

    /** 用户发表的动态id */
    private Long mid;

    /** 用户id */
    private String userId;

    /** 内容 */
    private String text;

    /** 发布地址 */
    private String location;

    /** 发布时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /** 点赞数 */
    private Integer fabulous;

    /** 用户昵称 */
    private String nickname;

    /** 用户头像 */
    private String avatar;


    private Boolean isLike=false;

    public Boolean getLike() {
        return isLike;
    }

    public void setLike(Boolean like) {
        isLike = like;
    }

    public void setMid(Long mid)
    {
        this.mid = mid;
    }

    public Long getMid() 
    {
        return mid;
    }
    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setText(String text)
    {
        this.text = text;
    }

    public String getText() 
    {
        return text;
    }
    public void setLocation(String location) 
    {
        this.location = location;
    }

    public String getLocation() 
    {
        return location;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getFabulous() {
        return fabulous;
    }

    public void setFabulous(Integer fabulous) {
        this.fabulous = fabulous;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("mid", getMid())
            .append("userId", getUserId())
            .append("text", getText())
            .append("location", getLocation())
            .append("createTime", getCreateTime())
            .append("fabulous",getFabulous())
                .append("nickname",getNickname())
                .append("avatar",getAvatar())
            .toString();
    }
}
